package jehc.djshi.log.service.impl;
import java.util.List;
import java.util.Map;

import jehc.djshi.log.dao.XtModifyRecordDao;
import jehc.djshi.log.model.XtModifyRecord;
import jehc.djshi.log.service.XtModifyRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import jehc.djshi.common.base.BaseService;
import jehc.djshi.common.util.ExceptionUtil;

/**
 * @Desc 修改记录日志
 * @Author 邓纯杰
 * @CreateTime 2012-12-12 12:12:12
 */
@Service("xtModifyRecordService")
public class XtModifyRecordServiceImpl extends BaseService implements XtModifyRecordService {
	@Autowired
	private XtModifyRecordDao xtModifyRecordDao;
	/**
	* 分页
	* @param condition 
	* @return
	*/
	public List<XtModifyRecord> getXtModifyRecordListByCondition(Map<String,Object> condition){
		try{
			return xtModifyRecordDao.getXtModifyRecordListByCondition(condition);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
	}
	/**
	* 查询对象
	* @param xt_modify_record_id 
	* @return
	*/
	public XtModifyRecord getXtModifyRecordById(String xt_modify_record_id){
		try{
			XtModifyRecord xt_Modify_Record = xtModifyRecordDao.getXtModifyRecordById(xt_modify_record_id);
			return xt_Modify_Record;
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
	}
	/**
	* 添加
	* @param xtModifyRecord
	* @return
	*/
	public int addXtModifyRecord(XtModifyRecord xtModifyRecord){
		int i = 0;
		try {
			i = xtModifyRecordDao.addXtModifyRecord(xtModifyRecord);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
	/**
	* 修改
	* @param xtModifyRecord
	* @return
	*/
	public int updateXtModifyRecord(XtModifyRecord xtModifyRecord){
		int i = 0;
		try {
			i = xtModifyRecordDao.updateXtModifyRecord(xtModifyRecord);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
	/**
	* 删除
	* @param condition 
	* @return
	*/
	public int delXtModifyRecord(Map<String,Object> condition){
		int i = 0;
		try {
			i = xtModifyRecordDao.delXtModifyRecord(condition);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
	/**
	* 批量添加
	* @param xtModifyRecordList
	* @return
	*/
	public int addBatchXtModifyRecord(List<XtModifyRecord> xtModifyRecordList){
		int i = 0;
		try {
			i = xtModifyRecordDao.addBatchXtModifyRecord(xtModifyRecordList);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
	/**
	* 批量修改
	* @param xtModifyRecordList
	* @return
	*/
	public int updateBatchXtModifyRecord(List<XtModifyRecord> xtModifyRecordList){
		int i = 0;
		try {
			i = xtModifyRecordDao.updateBatchXtModifyRecord(xtModifyRecordList);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
	
	/**
	* 批量添加
	* @param xtModifyRecordList
	* @return
	*/
	public int putBatchXtModifyRecord(List<XtModifyRecord> xtModifyRecordList){
		int i = 0;
		try {
			i = xtModifyRecordDao.addBatchXtModifyRecord(xtModifyRecordList);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
}
